$().ready(function(){
	 /**
     * 得到编辑器的纯文本内容
     * @name getPlainTxt
     * @grammar editor.getPlainTxt()  => String
     */
   $("#logupload").click(function(){
    var log_content = $("#log_content").val()

           .replace( /<(p|div)[^>]*>(<br\/?>)<\/\1>/gi, '\n' )
	       .replace( /<br\/?>/gi, '\n' )
	       .replace( /<[^>/]+>/g, '' )
	       .replace(/(&nbsp;)/g,"");
    var makesure=confirm("确定提交日志？");
    if(makesure==true){
    
	   $.ajax({
			  type:"post",
			  url:"LogUpload",
			  data:{
				  emp_id:$("#emp_id").val(),
				  log_content:log_content,
				  log_date:$("#log_date").val(),
				  reason:$("#reason").val(),
		      },
		      dataType:"json",
		   });
   
    };
	  
   });

});